package com.mr.cai.main.adapter;

import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.mr.cai.main.R;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 16-2-28.
 */
public class ClassifyTitleAdapter extends MrCaiBaseAdapter {
    private List test=new ArrayList();
    public ClassifyTitleAdapter(Activity context) {
        super(context);
        test.add("test1");
        test.add("test1");
        test.add("test1");
        test.add("test1");
        test.add("test1");
        test.add("test1");
        test.add("test1");

        test.add("test1");
        test.add("test1");
        test.add("test1");
        test.add("test1");
        test.add("test1");
        test.add("test1");
        test.add("test1");
        setList(test);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        if (convertView == null) {
            convertView = LayoutInflater.from(mContext).inflate(R.layout.navigation_item, null);
        }
        String name= (String) getList().get(position);
        ((TextView) convertView).setText(name);
        return convertView;
    }



}
